]> permondes.de Git - Analog_Engine.git/blame_incremental - scripts/Damped Harmonic Osciallator scaled.AESL
Potentials and Motion
[Analog_Engine.git] / scripts / Damped Harmonic Osciallator scaled.AESL
... / ...
CommitLineData
1IDENTIFICATION DIVISION
2PROGRAM-ID Damped_Oscillator
3
4ENVIRONMENT DIVISION
5ENGINE Anabrid-THAT
6TIMEBASE 1ms
7REQUIRES COEFFICIENT 5
8REQUIRES INTEGRATOR 2
9REQUIRES INVERTER 1
10REQUIRES SUMMER 2
11
12DATA DIVISION
13OUTPUT OUTPUT.U y
14ALIAS COEFFICIENT.1 InitialPosition
15ALIAS COEFFICIENT.2 InitialSpeed
16ALIAS COEFFICIENT.3 SpringForce
17ALIAS COEFFICIENT.4 Damping # linear to speed
18ALIAS COEFFICIENT.5 Mass # 1 / mass
19
20PROGRAM DIVISION
21# Colors being used for wiring
22# - black: y0
23# - blue: y0’
24# - green: y0’’
25# - yellow: y’’, y’
26# - red: y
27-1 -> InitialPosition -> -y0 # -initial position of the mass
28-1 -> InitialSpeed -> y0s’ # y’ is scaled to be within -1..+1
29+1, y0s’, y0s’ -> Summer -> y0’
30
31y’’, IC:y0’ -> INTEGRATOR -> -y’
32-y’,IC:-y0 -> INTEGRATOR -> y
33y -> SpringForce -> S*y # springforce times displacement
34-y’ -> INVERTER -> y’
35y’ -> Damping -> D*y’ # damping times speed
3610:S*y, 10:D*y’ -> SUMMER -> -(Dy’+Sy)
37-(Dy’+Sy) -> Mass -> -1/m*(Dy’+Sy)=y’’
38
39OPERATION DIVISION
40MODE REPEAT
41OP-TIME 57ms